<?php

namespace App\Http\Requests\ShopAdmin\Login;

use App\Http\Requests\Request;

class LoginRequest extends Request
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * 验证规则
     *
     * @return array
     */
    public function rules()
    {
        $rules =  [
            'user_name' => 'required',
            'password'=>'required',
            'chkCode'=>'required'
        ];
        return $rules;

    }

    /**
     * 验证信息
     * @return array
     */

    public function messages()
    {
        return [
            'user_name.required'  => '请输入用户名',
            'user_name.exists'  => '用户名不存在',
            'password.required'=>'请输入密码',
            'chkCode.required'=>'请输入验证码',

        ];
    }
}
